package com.wang.web3.data.api;


import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by SAR on 2018/4/18.
 */

public interface Api {

    @GET("api/config")
    Observable<String> apiConfig();

    @GET("MarketGirl/select")
    Observable<String> doGirlsTask(@Query("currentTabs") String currentTabs,
                                   @Query("pageNum") int pageNum,
                                   @Query("pageSize") int pageSize);

    @Headers("Content-Type: application/json")
    @POST("user/save")
    Observable<String> userSave(@Body RequestBody body);

    @GET("key/contractAddress")
    Observable<String> contractAddress();

    @GET("user/select")
    Observable<String> userInfo(@Header("address") String address);

    @GET("marketItem/selectAll")
    Observable<String> doPropsTask(@Query("currentTabs") String currentTabs,
                                   @Query("pageNum") int pageNum,
                                   @Query("pageSize") int pageSize);

    @GET("MarketGirl/selectGirlDetails")
    Observable<String> doGirlsDetailTask(@Query("girlId") int girlId);

    @GET("box/selectAll")
    Observable<String> boxList(@Header("address") String address);

    @GET("key/listAllKey")
    Observable<String> keyList(@Header("address") String address);

    @GET("user/select/girls")
    Observable<String> myGirlList(@Header("address") String address,
                                  @Query("currentTabs") String tabs,
                                  @Query("pageNum") int num,
                                  @Query("pageSize") int size);

    @GET("marketItem/selectItemAll")
    Observable<String> myPropsList(@Header("address") String address,
                                  @Query("currentTabs") String tabs,
                                  @Query("pageNum") int num,
                                  @Query("pageSize") int size);

    @GET("transaction/select")
    Observable<String> transactionList(@Header("address") String address,
                                   @Query("pageNum") int num,
                                   @Query("pageSize") int size);


//    @Query("type") String  type

}
